//
// Maths.hpp for  in /home/goldbe_y//tek3/Projets/Maths/302graphe
// 
// Made by yoni goldberg
// Login   <goldbe_y@epitech.net>
// 
// Started on  Mon Sep 24 14:38:25 2012 yoni goldberg
// Last update Mon Oct 22 11:19:21 2012 yoni goldberg
//

#ifndef MATHS
#define MATHS

#include "Parse.hpp"
#include <cstdlib>
#include "convert.hpp"

class Maths
{
public:
  Maths(const std::string &);
  ~Maths();

  std::string			&get_task();
  int				getNbTask() const;
  std::vector<std::string>	&get_contrainte();
  int				getNbContrainte() const;
  std::string			*get_p();
  std::vector<float>		get_time();
  float				*get_cumul();
  float				*get_cumul2();
  std::string			get_path();

private: // Vars
  // From Parse
  int				_nb_contrainte;
  int				_nb_task;
  std::vector<std::string>	_contrainte;
  std::string			_task;
  std::vector<float>		_time;

  // From Maths

  std::string			*_s; //successeurs
  std::string			*_p; //predecesseurs
  float				*_cumul;
  float				*_cumul2;
  std::string			_path;
  

private: // Funcs
  void				find_p();
  void				find_cumul();
  void				find_cumul2();
  void				find_path(char);
  bool				is_crit(char);
};
#endif
